1. Field of the Invention
Embodiments of the present invention relate at least to a method, medium, and system encoding and/or decoding image data, and more particularly, to a method, medium, and system encoding and/or decoding image data using a residue color transform to remove redundancy between chroma components in the image data.
2. Description of the Related Art
Generally, when an image is encoded, in order to increase the compression ratio, a color image format, such as an RGB format, is converted into an image format more appropriate for compression, such as a YCrCb format. However, when conversion to the YCrCb format is performed, the quality of an image is degraded during encoding such that the quality of any restored image through decoding of the encoded image will always be lowered. If, in order to reduce this loss from occurring when the RGB format is converted into the YCrCb format, each of the RGB color components is encoded independently in the conventional YCrCb encoder the correlation remaining between the RGB components cannot be used and the encoding efficiency is still lowered.
Recently, a residue transform technology (“Draft of Version 4 of H.264/AVC (ITU-T Recommendation H.264 and ISO/IEC 14496-10 (MPEG-4 part 10) Advanced Video Coding)”, ISO/IEC JTC 1/SC 29/WG 11, Document: JVT-N050d1, Hong Kong, January, 2005) has been proposed as a way of increasing encoding efficiency by reducing redundancy between color components through the use of correlations between color components.
Generally, image data is processed in macroblocks of 16×16 pixels, for example, when encoding and/or decoding is performed, as illustrated in FIG. 1 with three color components of the one macroblock. Although the term macroblock is used herein as a block within an image, the macroblock is not limited thereto. Here, one macroblock may further be divided into 4 block units of 8×8 pixels and processed. Accordingly, FIG. 1 illustrating an ordinary encoding order of the block units within each image macroblock. As illustrated, encoding is performed in block units of the color components macroblocks, of a macroblock, i.e., encoding is performed on the block units within the Y color component of the macroblock, then the Cb color component of the macroblock, and then the Cr color component of the macroblock. Herein, we will refer to these different color components as color component macroblocks.
Encoding of the Y color component macroblock is performed in an order of a first Y block unit 100, a second Y block unit 105, a third Y block unit 110, and a fourth Y block unit 115. Here, each block unit within the color macroblock may have identical sizes of 8×8 pixels, for example. Thereafter, encoding of the Cb color component macroblock is performed in the order of a first Cb block unit 120, a second Cb block unit 125, a third Cb block unit 130, and a fourth Cb block unit 135, and then, encoding of the Cr component macroblock is performed in the order of a first Cr block unit 140, a second Cr block unit 145, a third Cr block unit 150, and a fourth Cr block unit 155. Thus, the conventional encoding process sequences through the separate color components of a macroblock, e.g., from the Y color component macroblock, to the Cb color component macroblock, to the Cr color macroblock, and within each color component, the separate block units are encoded with a particular order.
FIG. 2 illustrates an ordinary structure of a corresponding bitstream, generated through entropy encoding of the encoded image data. As illustrated, the coefficients for block units, quantized in the particular order of Y, Cb and then Cr color components, are contiguously set forth in the bitstream in the same numbered order as the block encoding illustrated in FIG. 1, i.e., the bitstream first includes all block Y component information, sequentially from a block 1 through block 4 (illustrated FIG. 1 numbered block units 0, 1, 2, and 3) of the Y color component macroblock, then the block Cb component information, again sequentially from block 1 through block 4 (illustrated FIG. 1 numbered block units 4, 5, 6, and 7), and finally the block Cr component information, sequentially from block 1 through block 4 (illustrated FIG. 1 numbered block units 8, 9, 10, and 11). Here, when referring to “block” 1, 2, 3, or 4, of any of the color components, this reference is meant to refer to the corresponding position within each color component macroblock, e.g., block 1 of each color component macroblock is the left upper block unit, while the block 4 of each color component macroblock is the lower right block unit.
With the ordering of the conventional bitstream explained, FIG. 3 similarly illustrates the ordinary decoding order of image macroblocks. Accordingly, the decoding is performed in the same block units for each color component as the encoding. In particular, with the bitstream similar to that of FIG. 2 being input to a decoding system, entropy decoding, inverse quantization, and an inverse frequency domain transform, such as an inverse discrete cosine transform (IDCT), can be sequentially performed through color components, by reading data from the bitstream in the respective ordered block units.
More specifically, data in relation to the first Y block unit 100 is entropy decoded from the bitstream, and then, inverse quantization and an inverse frequency domain transform, such as an IDCT, are performed on the first Y block unit 100. If the entropy decoding for the first Y block unit 100 is completed, the entropy decoding, inverse quantization and inverse frequency domain transform for the second Y block unit 105 are performed. In the same manner, the entropy decoding, inverse quantization and inverse frequency domain transform for the third and fourth Y block units are then sequentially performed. By doing so, decoding of the Y color component is processed.
After the decoding of the Y color component macroblock is complete, decoding of the Cb color component may then be performed in the same manner, and then, similarly, decoding for the Cr color component may thereafter be performed. In this manner, decoding is performed sequentially in relation to each color component macroblock.
Accordingly, in such a conventional arrangement, if a residue color transform is performed during the encoding operation, then, during the decoding, an inverse residue color transform should be performed after the entropy decoding, inverse quantization and inverse frequency domain transform have completed.
Since the inverse residue transform is performed in block units of 8×8 blocks, for example, the inverse residue transform can be performed only after all pixel values of 8×8 block units of all Y, Cb, Cr color components have been restored. Accordingly, when decoding is performed in the conventional decoding order, the inverse residue color transform is delayed as shown in FIG. 3, thereby delaying the entire decoding process.
Thus, the inventors of the present invention have found that this delay is undesirable, and embodiments of the present invention attempt to avoid the same.